<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center Talentdetails_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub Talentdetails_fd0_0'>
          <view class='flex flex-wrap align-center Talentdetails_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  Talentdetails_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='Talentdetails_fd0_0_c1_c0'>人才详情</text>
          </view>
          <view class='flex flex-wrap align-center justify-end Talentdetails_fd0_0_c2'>
            <image @click.stop="isReport=!isReport" v-if="!isMy" class='Talentdetails_fd0_0_c2_c0' mode="aspectFit"
              :src='STATIC_URL+"167.png"'></image>
            <view v-if="isReport" :style="{top:StatusBarRpx + 60+'rpx', }"
              class='flex flex-wrap align-center self-center justify-center Talentdetails_fd0_0_c2_c1'
              @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/homePage/report/report?aid=${aid}&type=${info.type}`">
              <text class='Talentdetails_fd0_0_c2_c1_c0'>我要举报</text>
            </view>
          </view>
        </view>
      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout Talentdetails_flex_1">
        <!-- <view class='flex flex-direction flex-wrap align-stretch Talentdetails_fd1_0'>
          <view class='flex flex-wrap align-center justify-between'>
            <text class='Talentdetails_fd1_0_c0_c0'>高级电焊工</text>
            <text class='Talentdetails_fd1_0_c0_c1'>2024-08-08</text>
          </view>
          <view class='flex flex-wrap align-center Talentdetails_fd1_0_c1'>
            <view class='flex flex-wrap align-center Talentdetails_fd1_0_c1_c0'>
              <image class='Talentdetails_fd1_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"163.png"'></image>
              <text>{{info.address_area}}</text>
            </view>
            <view class='flex flex-wrap align-center Talentdetails_fd1_0_c1_c1'>
              <text class='Talentdetails_fd1_0_c1_c1_c0'>保洁</text>
            </view>
            <view class='flex flex-wrap align-center Talentdetails_fd1_0_c1_c1'>
              <text class='Talentdetails_fd1_0_c1_c1_c0'>保洁</text>
            </view>
            <view class='flex flex-wrap align-center Talentdetails_fd1_0_c1_c1'>
              <text class='Talentdetails_fd1_0_c1_c1_c0'>保洁</text>
            </view>
            <view class='flex flex-wrap align-center Talentdetails_fd1_0_c1_c1'>
              <text class='Talentdetails_fd1_0_c1_c1_c0'>保洁</text>
            </view>
            <view class='flex flex-wrap align-center Talentdetails_fd1_0_c1_c1'>
              <text class='Talentdetails_fd1_0_c1_c1_c0'>保洁</text>
            </view>
          </view>
          <view class='flex align-center flex-sub Talentdetails_fd1_0_c2'>
            <text class='Talentdetails_fd1_0_c2_c0'>4000-6000</text>
            <text>元/月</text>
          </view>
        </view> -->
        <view class='flex flex-direction align-stretch findingworkers_fd2_0'>
          <view class='flex flex-wrap align-start findingworkers_fd2_0_c0'>
            <view class="flex justify-between align-center" style="width: 100%;">
              <view class='flex flex-direction flex-wrap align-stretch flex-sub findingworkers_fd2_0_c0_c1'>
                <text class='findingworkers_fd2_0_c0_c1_c0'>{{info.true_name || '暂无'}}</text>
                <view class='flex flex-wrap align-center findingworkers_fd2_0_c1 margin-top-xs'>
                  <text>求职工种：{{info.job_type_name}}</text>
                </view>
              </view>
              <view class="findingworkers_fd2_0_c0_c0 position-relative">
                <image class='findingworkers_fd2_0_c0_c0' mode="aspectFill" :src='info.user_avatar'></image>
                <image class='sex' v-if="info.sex==1" mode="aspectFit" :src='STATIC_URL+"152.png"'>
                  <image class='sex' v-if="info.sex==2" mode="aspectFit" :src='STATIC_URL+"153.png"'>
              </view>

            </view>
            <view class='flex align-center justify-between margin-top-xs' style="width: 500rpx">
              <view class="flex align-center">
                <image class=' icons' mode="aspectFit" :src='STATIC_URL+"184.png"'>
                </image>
                <view class='findingworkers_fd2_0_c0_c1_c1_c0'>{{info.job_years_name}}</view>
              </view>

              <view class="flex align-center">
                <image class='icons' mode="aspectFit" :src='STATIC_URL+"185.png"'></image>
                <view class='findingworkers_fd2_0_c0_c1_c1_c0'>{{info.job_education_name}}</view>
              </view>
              <view class="flex align-center">
                <image class='icons' mode="aspectFit" :src='STATIC_URL+"186.png"'></image>
                <view class='findingworkers_fd2_0_c0_c1_c1_c0'>{{info.get_age}}</view>
              </view>
              <view class="flex align-center">
                <image class='icons' mode="aspectFit" :src='STATIC_URL+"187.png"'></image>
                <view class='findingworkers_fd2_0_c0_c1_c1_c0'>{{info.part_job_name}}</view>
              </view>
            </view>
          </view>

          <view class='flex flex-wrap align-center text-666 findingworkers_fd2_0_c2'>
            <text>个人优势：{{info.advantage}}</text>
          </view>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch Talentdetails_fd1_1'>
          <text class='Talentdetails_fd1_1_c0'>求职意向</text>
          <view class='flex flex-wrap align-stretch justify-between'>
            <view class='flex align-center justify-between flex-sub Talentdetails_fd1_1_c1_c0'>
              <view class='Talentdetails_fd1_0_c0_c1'>意向地点 {{info.address_area}}</view>
              <view class='self-end Talentdetails_fd1_1_c1_c0_c1'>意向薪资 {{info.intended_wage || '--'}}
                <text v-if="info.intended_wage">元/月</text>
              </view>
            </view>
          </view>
        </view>
        <view class='flex flex-direction align-start Talentdetails_fd1_2'>
          <text class='Talentdetails_fd1_1_c0'>自我介绍</text>
          <view class='flex flex-wrap align-center Talentdetails_fd1_2_c1'>
            <text class='Talentdetails_fd1_2_c1_c0'>{{info.self_introduction}}</text>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1719903243161" :mask="true" :mask-close-able="false" mode='center'>
        <!---删除弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center Talentdetails_flex_2">
          <text class='Talentdetails_fd2_0'>温馨提示</text>
          <text class='Talentdetails_fd2_1'>涉及金钱交易请谨慎, 谨防诈骗</text>
          <view class='flex flex-wrap align-center Talentdetails_fd2_2'>
            <button class='Talentdetails_fd2_2_c0' @click.stop="callPhone">立刻拨打</button>
          </view>
        </view>

        <!---删除弹窗flex布局结束-->

      </benben-popup>
      <view class="flex flex-wrap align-center justify-between benben-position-layout flex Talentdetails_flex_3"
        :style="{height:(120+bottomSafeAreaRpx)+'rpx',paddingBottom:bottomSafeAreaRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub Talentdetails_fd3_0'
          v-if="isLogin && (userInfo.id!=info.user_id)">
          <view class='flex flex-direction flex-wrap align-center' @click.stop="collect">
            <image class='Talentdetails_fd3_0_c0_c0' mode="aspectFit" v-if="info.is_collect==1"
              :src='STATIC_URL+"161.png"'></image>

            <image class='Talentdetails_fd3_0_c0_c0' mode="aspectFit" v-if="info.is_collect==0"
              :src='STATIC_URL+"160.png"'></image>
            <text class='Talentdetails_fd3_0_c0_c2'>收藏</text>
          </view>
          <button class='Talentdetails_fd3_0_c1' @tap.stop="popupShow1719903243161=true">立即咨询</button>
        </view>
        <button class='Talentdetails_fd3_1' v-if="isLogin && (userInfo.id==info.user_id)"
          @click.stop="upxian">{{info.status ==0 ? '立刻上架'
          :info.status==1? '立刻下架' : ''}}</button>
        <button class='Talentdetails_fd3_2' @tap.stop="handleJumpDiy" data-type="navigateTo"
          v-if="isLogin && (userInfo.id==info.user_id) "
          :data-url="`/pages/homePage/publishresume/publishresume?aid=${info.aid}`">编辑</button>

      </view>
      <view :style="{height: (120+bottomSafeAreaRpx)+'rpx'}"></view>


    </view>
  </page-body>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        "popupShow1719903243161": false,
        "aid": "",
        isMy: '',
        info: '',
        isReport: false
      };
    },
    computed: {
      userInfo() {
        return this.$store.state.userInfo
      },
      isLogin() {
        return this.$store.state.token == '' ? false : true;
      }
    },
    watch: {},
    onLoad(options) {
      let {
        aid,
        isMy
      } = options
      if (aid !== undefined) this.aid = aid
      if (isMy !== undefined) this.isMy = isMy
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getData()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      callPhone() {
        this.popupShow1719903243161 = false
        uni.makePhoneCall({
          phoneNumber: this.info.user_mobile
        })
      },
      collect() {
        this.$api.post(global.apiUrls.post6672bac685dea, {
          collect_id: this.info.aid,
          type: this.info.type
        }).then(res => {
          if (res.data.code == 1) {
            if (this.info.is_collect == 0) {
              this.info.is_collect = 1
            } else {
              this.info.is_collect = 0
            }
          }
        })
      },
      upxian() {
        this.$api.post(global.apiUrls.post6676ac20b93b3, {
          // user_id: this.isMy ? this.userInfo.id : this.aid
        }).then(res => {
          if (res.data.code == 1) {
            this.getData()
          }
        })
      },
      getData() {
        this.$api.post(global.apiUrls.post66701a06cae37, {
          user_id: this.isMy ? this.userInfo.id : this.aid
        }).then(res => {
          if (res.data.code == 1) {
            this.info = res.data.data
          }
        })
      }
    }
  };
</script>
<style lang="scss" scoped>
  .sex {
    position: absolute;
    top: 0;
    right: 0;
    width: 36rpx;
    height: 36rpx;
  }

  .icons {
    width: 36rpx;
    height: 36rpx;
    display: block;
    margin-right: 8rpx
  }

  .findingworkers_fd2_0_c5 {
    background: rgba(238, 238, 238, 1);
    height: 1rpx;
    transform: scaleY(0.5);
    margin: 0rpx 32rpx 0rpx 32rpx;
  }

  .findingworkers_fd2_0_c4 {
    background: rgba(238, 238, 238, 1);
    height: 1rpx;
    margin: 28rpx 32rpx 0rpx 32rpx;
    transform: scaleY(0.5);
  }

  .findingworkers_fd2_0_c3 {
    line-height: 40rpx;
    font-size: 28rpx;
    font-weight: 500;
    color: rgba(133, 133, 133, 1);
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    margin: 24rpx 32rpx 0rpx 32rpx;
  }

  .findingworkers_fd2_0_c2 {
    // color: rgba(16, 16, 16, 1);
    padding: 24rpx;
  }

  .findingworkers_fd2_0_c1 {
    color: #333333;
    // padding: 24rpx 0;
  }

  .findingworkers_fd2_0_c0_c1_c1_c7 {
    background: rgba(248, 248, 248, 1);
    width: 1rpx;
    height: 30rpx;
    margin: 0rpx 16rpx 0rpx 16rpx;
    transform: scaleX(0.5);
  }

  .findingworkers_fd2_0_c0_c1_c1_c1 {
    background: rgba(248, 248, 248, 1);
    width: 4rpx;
    height: 30rpx;
    margin: 0rpx 16rpx 0rpx 16rpx;
    transform: scaleX(0.5);
  }

  .findingworkers_fd2_0_c0_c1_c1_c0 {
    color: rgba(153, 153, 153, 1);
    font-size: 24rpx;
  }

  .findingworkers_fd2_0_c0_c1_c0 {
    line-height: 40rpx;
    font-size: 40rpx;
    font-weight: 400;
    color: #101010;
    margin: 0rpx 0rpx 8rpx 0rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .findingworkers_fd2_0_c0_c1 {
    // margin: 0rpx 0rpx 0rpx 16rpx;
  }

  .findingworkers_fd2_0_c0_c0 {
    width: 100rpx;
    height: 100rpx;
    border-radius: 100rpx;
  }

  .findingworkers_fd2_0_c0 {
    margin: 0rpx 32rpx 0rpx 32rpx;
  }

  .findingworkers_fd2_0 {
    padding: 0rpx 0rpx 0 0rpx;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
  }

  .Talentdetails_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .Talentdetails_fd0_0_c2_c1_c0 {
    color: rgba(255, 255, 255, 1);
  }

  .Talentdetails_fd0_0_c2_c1 {
    background: url(image-path('168.png')) no-repeat;
    background-size: 100% 100%;
    width: 160rpx;
    height: 82rpx;
    position: fixed;
    z-index: 11;
    right: 24rpx;
    // top: 0rpx;
  }

  .Talentdetails_fd0_0_c2_c0 {
    width: 44rpx;
    height: 11rpx;
  }

  .Talentdetails_fd0_0_c2 {
    width: 120rpx;
    position: relative;
  }

  .Talentdetails_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .Talentdetails_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .Talentdetails_fd0_0_c0 {
    width: 120rpx;
  }

  .Talentdetails_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .Talentdetails_flex_1 {
    padding: 0rpx 0rpx 100rpx 0rpx;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_2_c1_c0 {
    font-size: 30rpx;
    color: var(--benbenFontColor2);
  }

  .Talentdetails_fd1_2_c1 {
    margin: 20rpx 0rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_2 {
    width: 100%;
    background: #FFFFFF;
    border-radius: 16rpx;
    padding: 24rpx;
    margin: 0rpx auto 24rpx auto;
  }

  .Talentdetails_fd1_1_c1_c0_c1 {
    margin: 0rpx 0rpx 0rpx 24rpx;
    color: var(--benbenFontColor2);
  }

  .Talentdetails_fd1_1_c1_c0 {
    margin: 20rpx 0rpx 20rpx 0rpx;
    font-size: 30rpx;
  }

  .Talentdetails_fd1_1_c0 {
    font-size: 36rpx;
    color: rgba(16, 16, 16, 1);
    font-weight: 600;
  }

  .Talentdetails_fd1_1 {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background: #FFFFFF;
    border-radius: 16rpx;
    padding: 24rpx;
  }

  .Talentdetails_fd1_0_c2_c0 {
    font-size: 48rpx;
    font-weight: 500;
    margin: 0rpx 12rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_0_c2 {
    color: rgba(251, 99, 80, 1);
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_0_c1_c1_c0 {
    color: var(--benbenFontColor1);
    font-size: 26rpx;
  }

  .Talentdetails_fd1_0_c1_c1 {
    background: #F6F6F6;
    border-radius: 6rpx 6rpx 6rpx 6rpx;
    height: 50rpx;
    line-height: 50rpx;
    padding: 0rpx 8rpx 0rpx 8rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_0_c1_c0_c0 {
    width: 36rpx;
    height: 36rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_0_c1_c0 {
    margin: 0rpx 32rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_0_c1 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .Talentdetails_fd1_0_c0_c1 {
    color: var(--benbenFontColor2);
  }

  .Talentdetails_fd1_0_c0_c0 {
    font-size: 40rpx;
    color: rgba(16, 16, 16, 1);
    font-weight: 600;
  }

  .Talentdetails_fd1_0 {
    border-bottom: 1px solid #eee;
    background: #FFFFFF;
    border-radius: 16rpx;
    padding: 24rpx;
  }

  .Talentdetails_flex_2 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .Talentdetails_fd2_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 16rpx;
    font-size: 32rpx;
    color: rgba(255, 111, 2, 1);
    font-weight: 500;
    width: 540rpx;
  }

  .Talentdetails_fd2_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .Talentdetails_fd2_1 {
    line-height: 52rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 32rpx 0rpx 32rpx;
    text-align: center;
  }

  .Talentdetails_fd2_0 {
    font-size: 36rpx;
    font-weight: 700;
    line-height: 32rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }

  .Talentdetails_flex_3 {
    background: #FFFFFF;
    width: 750rpx;
    height: 120rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
    background-size: 100% auto;
    left: 0rpx;
  }

  .Talentdetails_fd3_2 {
    background: #FF6F02;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    width: 333rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    height: 88rpx;
    margin: 0rpx 32rpx 0rpx 0rpx;
  }

  .Talentdetails_fd3_1 {
    background: #484848;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    width: 333rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    height: 88rpx;
    margin: 0rpx 0rpx 0rpx 32rpx;
  }

  .Talentdetails_fd3_0_c1 {
    background: #FF6F02;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    width: 580rpx;
    line-height: 88rpx;
    font-size: 28rpx;
    color: #fff;
    height: 88rpx;
  }

  .Talentdetails_fd3_0_c0_c2 {
    font-size: 22rpx;
    margin: 8rpx 0rpx 0rpx 0rpx;
  }

  .Talentdetails_fd3_0_c0_c0 {
    width: 48rpx;
    height: 48rpx;
  }

  .Talentdetails_fd3_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }
</style>
